package com.example.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.example.service.ServiceApi;
import org.springframework.stereotype.Component;

import java.util.UUID;

/**
 * @ClassName ServiceApiImpl
 * @Description TODO
 * @Author zhaoluowei
 * @Date 2019/9/8  12:36
 * @Version 1.0
 */
//要把这个方法注册成为bean 这个方式是spring的  注册成功service的要使用dubbo方式
//@Component("serviceApiImpl")
//@Service(interfaceClass = ServiceApi.class) // 对外暴露服务
public class ServiceApiImpl implements ServiceApi {


    @Override
    public String sendMsg(String message) {
        String uuid = UUID.randomUUID().toString();
        return "provider message --> "+uuid+" : "+message;
    }

    @Override
    public boolean isTrueSeats(String seats) {
        return false;
    }

    @Override
    public boolean isNotSold(String seats) {
        return false;
    }

    @Override
    public String saveOrder(String fildId, String seats, String seatNum) {
        return null;
    }
}
